package com.job.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.sql.Date;

/**
 * 简历实体
 * @author hasee
 */
@Entity
@Table
public class Resume {
    /**
     * 简历id
     */
    private int resumeId;
    /**
     * 用户id
     */
    private int userId;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 用户性别
     */
    private String userSex;
    /**
     * 用户文凭
     */
    private String userDiploma;
    /**
     * 用户学校
     */
    private String userSchool;
    /**
     * 用户专业
     */
    private String userMajor;

    private String userEmail;
    /**
     * 头像图片地址
     */
    private String userImagePath;
    private String userPhone;
    private Date educationStart1;
    private String educationProject1;
    private String educationSchool1;
    private Date educationStart2;
    private String educationProject2;
    private String educationSchool2;
       private Date JobStart1;
        private String    jobPost1;
    private String jobCompany1;
        private String    jobExperience1;
   private Date jobStrart2;
   private String jobPost2;
          private String  JobCompany2;
   private String  JobExperience2;
private String    userSkill1;
   private String userSkill2;
 private String   userSkill3;
  private String          introduce;
    private String jobCompany2;
    private String jobExperience2;
    private Date jobStart1;

    @Id
    @GeneratedValue(generator="increment")
    @Column(name = "resumeId")
    @GenericGenerator(name="increment", strategy = "increment")
    public int getResumeId() {
        return resumeId;
    }

    public void setResumeId(int resumeId) {
        this.resumeId = resumeId;
    }

    @Basic
    @Column(name = "userId")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "userName")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "userSex")
    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    @Basic
    @Column(name = "userDiploma")
    public String getUserDiploma() {
        return userDiploma;
    }

    public void setUserDiploma(String userDiploma) {
        this.userDiploma = userDiploma;
    }

    @Basic
    @Column(name = "userSchool")
    public String getUserSchool() {
        return userSchool;
    }

    public void setUserSchool(String userSchool) {
        this.userSchool = userSchool;
    }

    @Basic
    @Column(name = "userMajor")
    public String getUserMajor() {
        return userMajor;
    }

    public void setUserMajor(String userMajor) {
        this.userMajor = userMajor;
    }

    @Basic
    @Column(name = "userEmail")
    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    @Basic
    @Column(name = "userImagePath")
    public String getUserImagePath() {
        return userImagePath;
    }

    public void setUserImagePath(String userImagePath) {
        this.userImagePath = userImagePath;
    }

    @Basic
    @Column(name = "userPhone")
    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    @Basic
    @Column(name = "educationStart1")
    public Date getEducationStart1() {
        return educationStart1;
    }

    public void setEducationStart1(Date educationStart1) {
        this.educationStart1 = educationStart1;
    }

    @Basic
    @Column(name = "educationProject1")
    public String getEducationProject1() {
        return educationProject1;
    }

    public void setEducationProject1(String educationProject1) {
        this.educationProject1 = educationProject1;
    }

    @Basic
    @Column(name = "educationSchool1")
    public String getEducationSchool1() {
        return educationSchool1;
    }

    public void setEducationSchool1(String educationSchool1) {
        this.educationSchool1 = educationSchool1;
    }

    @Basic
    @Column(name = "educationStart2")
    public Date getEducationStart2() {
        return educationStart2;
    }

    public void setEducationStart2(Date educationStart2) {
        this.educationStart2 = educationStart2;
    }

    @Basic
    @Column(name = "educationProject2")
    public String getEducationProject2() {
        return educationProject2;
    }

    public void setEducationProject2(String educationProject2) {
        this.educationProject2 = educationProject2;
    }

    @Basic
    @Column(name = "educationSchool2")
    public String getEducationSchool2() {
        return educationSchool2;
    }

    public void setEducationSchool2(String educationSchool2) {
        this.educationSchool2 = educationSchool2;
    }

    @Basic
    @Column(name = "jobStart1")
    public Date getJobStart1() {
        return JobStart1;
    }

    public void setJobStart1(Date jobStart1) {
        JobStart1 = jobStart1;
    }

    @Basic
    @Column(name = "jobPost1")
    public String getJobPost1() {
        return jobPost1;
    }

    public void setJobPost1(String jobPost1) {
        this.jobPost1 = jobPost1;
    }

    @Basic
    @Column(name = "jobCompany1")
    public String getJobCompany1() {
        return jobCompany1;
    }

    public void setJobCompany1(String jobCompany1) {
        this.jobCompany1 = jobCompany1;
    }

    @Basic
    @Column(name = "jobExperience1")
    public String getJobExperience1() {
        return jobExperience1;
    }

    public void setJobExperience1(String jobExperience1) {
        this.jobExperience1 = jobExperience1;
    }

    @Basic
    @Column(name = "jobStrart2")
    public Date getJobStrart2() {
        return jobStrart2;
    }

    public void setJobStrart2(Date jobStrart2) {
        this.jobStrart2 = jobStrart2;
    }

    @Basic
    @Column(name = "jobPost2")
    public String getJobPost2() {
        return jobPost2;
    }

    public void setJobPost2(String jobPost2) {
        this.jobPost2 = jobPost2;
    }

    @Basic
    @Column(name = "jobCompany2")
    public String getJobCompany2() {
        return JobCompany2;
    }

    public void setJobCompany2(String jobCompany2) {
        JobCompany2 = jobCompany2;
    }

    @Basic
    @Column(name = "jobExperience2")
    public String getJobExperience2() {
        return JobExperience2;
    }

    public void setJobExperience2(String jobExperience2) {
        JobExperience2 = jobExperience2;
    }

    @Basic
    @Column(name = "userSkill1")
    public String getUserSkill1() {
        return userSkill1;
    }

    public void setUserSkill1(String userSkill1) {
        this.userSkill1 = userSkill1;
    }

    @Basic
    @Column(name = "userSkill2")
    public String getUserSkill2() {
        return userSkill2;
    }

    public void setUserSkill2(String userSkill2) {
        this.userSkill2 = userSkill2;
    }

    @Basic
    @Column(name = "userSkill3")
    public String getUserSkill3() {
        return userSkill3;
    }

    public void setUserSkill3(String userSkill3) {
        this.userSkill3 = userSkill3;
    }

    @Basic
    @Column(name = "introduce")
    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Resume resume = (Resume) o;

        if (resumeId != resume.resumeId) return false;
        if (userId != resume.userId) return false;
        if (userName != null ? !userName.equals(resume.userName) : resume.userName != null) return false;
        if (userSex != null ? !userSex.equals(resume.userSex) : resume.userSex != null) return false;
        if (userDiploma != null ? !userDiploma.equals(resume.userDiploma) : resume.userDiploma != null) return false;
        if (userSchool != null ? !userSchool.equals(resume.userSchool) : resume.userSchool != null) return false;
        if (userMajor != null ? !userMajor.equals(resume.userMajor) : resume.userMajor != null) return false;
        if (userEmail != null ? !userEmail.equals(resume.userEmail) : resume.userEmail != null) return false;
        if (userImagePath != null ? !userImagePath.equals(resume.userImagePath) : resume.userImagePath != null)
            return false;
        if (userPhone != null ? !userPhone.equals(resume.userPhone) : resume.userPhone != null) return false;
        if (educationStart1 != null ? !educationStart1.equals(resume.educationStart1) : resume.educationStart1 != null)
            return false;
        if (educationProject1 != null ? !educationProject1.equals(resume.educationProject1) : resume.educationProject1 != null)
            return false;
        if (educationSchool1 != null ? !educationSchool1.equals(resume.educationSchool1) : resume.educationSchool1 != null)
            return false;
        if (educationStart2 != null ? !educationStart2.equals(resume.educationStart2) : resume.educationStart2 != null)
            return false;
        if (educationProject2 != null ? !educationProject2.equals(resume.educationProject2) : resume.educationProject2 != null)
            return false;
        if (educationSchool2 != null ? !educationSchool2.equals(resume.educationSchool2) : resume.educationSchool2 != null)
            return false;
        if (JobStart1 != null ? !JobStart1.equals(resume.JobStart1) : resume.JobStart1 != null) return false;
        if (jobPost1 != null ? !jobPost1.equals(resume.jobPost1) : resume.jobPost1 != null) return false;
        if (jobCompany1 != null ? !jobCompany1.equals(resume.jobCompany1) : resume.jobCompany1 != null) return false;
        if (jobExperience1 != null ? !jobExperience1.equals(resume.jobExperience1) : resume.jobExperience1 != null)
            return false;
        if (jobStrart2 != null ? !jobStrart2.equals(resume.jobStrart2) : resume.jobStrart2 != null) return false;
        if (jobPost2 != null ? !jobPost2.equals(resume.jobPost2) : resume.jobPost2 != null) return false;
        if (JobCompany2 != null ? !JobCompany2.equals(resume.JobCompany2) : resume.JobCompany2 != null) return false;
        if (JobExperience2 != null ? !JobExperience2.equals(resume.JobExperience2) : resume.JobExperience2 != null)
            return false;
        if (userSkill1 != null ? !userSkill1.equals(resume.userSkill1) : resume.userSkill1 != null) return false;
        if (userSkill2 != null ? !userSkill2.equals(resume.userSkill2) : resume.userSkill2 != null) return false;
        if (userSkill3 != null ? !userSkill3.equals(resume.userSkill3) : resume.userSkill3 != null) return false;
        if (introduce != null ? !introduce.equals(resume.introduce) : resume.introduce != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = resumeId;
        result = 31 * result + (educationProject1 != null ? educationProject1.hashCode() : 0);
        result = 31 * result + (educationProject2 != null ? educationProject2.hashCode() : 0);
        result = 31 * result + (educationSchool1 != null ? educationSchool1.hashCode() : 0);
        result = 31 * result + (educationSchool2 != null ? educationSchool2.hashCode() : 0);
        result = 31 * result + (educationStart1 != null ? educationStart1.hashCode() : 0);
        result = 31 * result + (educationStart2 != null ? educationStart2.hashCode() : 0);
        result = 31 * result + (introduce != null ? introduce.hashCode() : 0);
        result = 31 * result + (jobCompany1 != null ? jobCompany1.hashCode() : 0);
        result = 31 * result + (JobCompany2 != null ? JobCompany2.hashCode() : 0);
        result = 31 * result + (jobExperience1 != null ? jobExperience1.hashCode() : 0);
        result = 31 * result + (JobExperience2 != null ? JobExperience2.hashCode() : 0);
        result = 31 * result + (jobPost1 != null ? jobPost1.hashCode() : 0);
        result = 31 * result + (jobPost2 != null ? jobPost2.hashCode() : 0);
        result = 31 * result + (JobStart1 != null ? JobStart1.hashCode() : 0);
        result = 31 * result + (jobStrart2 != null ? jobStrart2.hashCode() : 0);
        result = 31 * result + (userDiploma != null ? userDiploma.hashCode() : 0);
        result = 31 * result + (userEmail != null ? userEmail.hashCode() : 0);
        result = 31 * result + userId;
        result = 31 * result + (userImagePath != null ? userImagePath.hashCode() : 0);
        result = 31 * result + (userMajor != null ? userMajor.hashCode() : 0);
        result = 31 * result + (userName != null ? userName.hashCode() : 0);
        result = 31 * result + (userPhone != null ? userPhone.hashCode() : 0);
        result = 31 * result + (userSchool != null ? userSchool.hashCode() : 0);
        result = 31 * result + (userSex != null ? userSex.hashCode() : 0);
        result = 31 * result + (userSkill1 != null ? userSkill1.hashCode() : 0);
        result = 31 * result + (userSkill2 != null ? userSkill2.hashCode() : 0);
        result = 31 * result + (userSkill3 != null ? userSkill3.hashCode() : 0);
        return result;
    }
}
